//
//  AppDelegate.swift
//  SinaWeibo
//
//  Created by 韩啸宇 on 15/12/19.
//  Copyright © 2015年 backy. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        UITabBar.appearance().tintColor = UIColor.orangeColor()
        return true
    }


}

func XYLog(file: String = __FILE__, method: String = __FUNCTION__, line: Int = __LINE__) {
    let fileName = (file as NSString).componentsSeparatedByString("/").last!
    print("\(fileName)文件 || \(line)行 || \(method)方法")
}

func XYLog<T>(message: T?, file: String = __FILE__, method: String = __FUNCTION__, line: Int = __LINE__) {

    let fileName = (file as NSString).componentsSeparatedByString("/").last!

    guard let msg = message else {
        print("\(fileName)文件 || \(line)行 || \(method)方法")
        return
    }
    print("\(fileName)文件 || \(line)行 || \(method)方法:\t\(msg)")
}

